""" 
Some esperanto games, tests, e t.c.

Here will be used x-sistemo per skribi.
"""

digits = ["nulo","unu","du","tri","kvar","kvin","ses","sep","ok","naux"]
	
def number_by_string_less_mil(n):
	res = ""
	if n % 10 != 0:
		res+=digits[n%10]
	n=n/10
	if n % 10 !=0:
		res=digits[n%10]+"dek "+res 
	n=n/10
	if n%10 !=0:
		res=digits[n%10]+"cent "+res
	return res

def number_by_string(n):
	res=number_by_string_less_mil(n%1000)
	n=n/1000
	if n==1:
		return "mil "+res
	elif n!=0:
		res=number_by_string_less_mil(n%1000)+" mil "+res
	n=n/1000
	if n==1:
		return "miliono "+res
	elif n!=0:
		res=number_by_string_less_mil(n%1000)+" milionoj "+res
	return res

